﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Data;

namespace CMD.BAL.SOL
{
    [DataContractAttribute]
    public class LastReviewDate
    {
         [DataMemberAttribute(EmitDefaultValue = false)]
        public string fecha;
        public static LastReviewDate GetDataFecha()
        {
            try
            {
                LastReviewDate lrd;
                DataTable dt =CMD_WEB.DAL.SrvDB.ExecuteQuery("exec SP_CMD_WF_GETLASTREVIEWDATE");
                if (dt.Rows.Count == 0)
                {
                    return null;
                }
                else
                {
                    lrd = new LastReviewDate (Convert.ToString(dt.Rows[0]["FECHA"]));
                }
                return lrd;
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
        public LastReviewDate()
        {
            fecha="";
        }
        public LastReviewDate(string fecha)
        {
            this.fecha =fecha;
        }
    }
}
